<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Member/index')}">用户管理</a></li>
		</ul>
		<php>$user_statuses=array("0"=>"普通会员","1"=>"黄金会员","2"=>"铂金会员","3"=>"区级合伙人","4"=>"市级合伙人","5"=>"省级合伙人");</php>
		<php>$user_account_statuses=array("0"=>"正常","1"=>"已冻结");</php>
        <form class="well form-inline margin-top-20" method="get" action="{:url('Member/index')}">
			会员身份：
			<select class="form-control" name="level">
				<option value="-1">请选择</option>
				<foreach name="user_statuses" item="vo" key="k">
					<option value="{$k}" <if condition="$searchInfo['level'] eq $k">selected</if> >{$vo}</option>
				</foreach>
			</select>
			状态：
			<select class="form-control" name="account_status">
				<option value="-1">请选择</option>
				<foreach name="user_account_statuses" item="vo" key="k">
					<option value="{$k}" <if condition="$searchInfo['account_status'] eq $k">selected</if> >{$vo}</option>
				</foreach>
			</select>
            姓名:
            <input type="text" class="form-control" name="user_name" style="width: 120px;" value="{:input('request.user_name/s','')}" placeholder="请输入姓名">
            手机号:
            <input type="text" class="form-control" name="mobile" style="width: 120px;" value="{:input('request.mobile/s','')}" placeholder="请输入手机号">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('Member/index')}">清空</a>
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>用户姓名</th>
					<th>用户手机号</th>
					<th>身份证号</th>
					<th>账户余额</th>
					<th>会员身份</th>
					<th>状态</th>
					<th width="140">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="users" item="vo">
				<tr>
					<td>{$vo.user_id}</td>
					<td>{$vo.user_name}</td>
					<td>{$vo.mobile}</td>
					<td>
						{$vo.iden_card}
					</td>
					<td>{$vo.balance}</td>
					<td>
						{$user_statuses[$vo['level']]}
					</td>
					<td>
						{$user_account_statuses[$vo['account_status']]}
					</td>
					<td>
						<if condition="$vo['account_status'] eq 1">
							<a class="btn btn-xs btn-primary js-ajax-dialog-btn" href="{:url('member/freeze',array('id'=>$vo['user_id'],'status'=>0))}" data-msg="您确定要取消冻结此账号吗？">取消冻结</a>
						<else />
							<a class="btn btn-xs btn-primary js-ajax-dialog-btn" href='{:url("member/freeze",array("id"=>$vo["user_id"],"status"=>1))}' data-msg="您确定要冻结此账号吗？">冻结</a>
						</if>
						<a class="btn btn-xs btn-primary btn-warning " href='{:url("member/detail",array("id"=>$vo["user_id"]))}'>详情</a>
						<a class="btn btn-xs btn-primary " href='{:url("member/recharge",array("user_id"=>$vo["user_id"]))}'>充值</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>